#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2020/11/28
# @Author   :Changshu
# @File     :Exercise_500.py
# 500. 键盘行
# 给定一个单词列表，只返回可以使用在键盘同一行的字母打印出来的单词。
# qwertyuiop
# asdfghjkl
# zxcvbnm

def findWords(words: list) -> list:
	r=[]
	s1=set('qwertyuiop')
	s2=set('asdfghjkl')
	s3=set('zxcvbnm')
	for word in words:
		s=set(word.lower())
		if s1>=s or s2>=s or s3>=s:
			r.append(word)
	return r

if __name__ == '__main__':
	words=["Hello", "Alaska", "Dad", "Peace"]
	print(findWords(words))